#pragma once

#include "ColligereDataImporterBase.hpp"
#include "ColligereAudioDatabaseHandler.hpp"

namespace col 
{

/*! @brief A class for importing data from CATraxx.
 *
 * @note It has been a while since this class has been tested
 *       since I don't have an CATraxx licence and the trial perioid 
 *       has expired.
 **/
class CatraxxXmlDataImporter : public XmlDataImporterBase
{
public:
	void Load ( const wxURI &rIn );
	void Import ( DatabaseInterfaceBase &rDest );
	//! Returns the count of "record" nodes.
	wxUint32 GetItemCount() const;
protected:
	void InitializeItemFromNode ( const wxXmlNode *pNode, DatabaseItemBase &rItem ) const;
private:
	bool IsValidCatraxxXmlFile() const;

	void ParseTracks ( const wxXmlNode *pFromAlbumNode, Album &rToAlbum,
		const Artist &rParentArtist ) const;

	wxXmlDocument mInDoc;
};

}